<?php
/**
 * 区域表单字段
 */

namespace App\Console\AdminFormFillByFormId\FieldMakers;


class MiniProgramDraftFormFieldMaker extends BaseFormFieldMaker {
    const FORM_ID         = 5;
    const FORM_TITLE      = '小程序代码草稿列表';
    const FORM_TABLE_NAME = 'mini_program_draft';

    protected function _getFormData() {
        $this->formId = self::FORM_ID;

        return [
            'id'                   => self::FORM_ID,
            'title'                => self::FORM_TITLE,
            'table_name'           => self::FORM_TABLE_NAME,
            self::FIELD_KEY        => [
                [
                    'title'       => '草稿id',
                    'field_name'  => 'draft_id',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => '[]',
                    'order'       => 1,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '版本描述',
                    'field_name'  => 'user_desc',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '版本号',
                    'field_name'  => 'user_version',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 3,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '上传时间',
                    'field_name'  => 'create_time',
                    'field_type'  => 'datetime',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 4,
                    'display'     => 1,
                    'searchable'  => 1,
                    'show_column' => 1,
                ],
            ],
            self::FILTER_GROUP_KEY => [
                [
                    'title'      => '全部',
                    'can_edit'   => 0,
                    'is_system'  => 1,
                    'uid'        => -1,
                    'order'      => 1,
                    'created_at' => $this->_mTime,
                    'updated_at' => $this->_mTime,
                    'conditions' => [],
                ],
            ],
        ];
    }
}